using System;
using System.Collections;

namespace Com.CMS263.PO
{
	#region Area

	/// <summary>
	/// Area object for NHibernate mapped table 'area'.
	/// </summary>
	public class Area
	{
		#region Member Variables
		
		protected int _id;
		protected string _code;
		protected string _name;
		protected string _cityId;

		#endregion

		#region Constructors

		public Area() { }

		public Area( string code, string name, string cityId )
		{
			this._code = code;
			this._name = name;
			this._cityId = cityId;
		}

		#endregion

		#region Public Properties

		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public  virtual string Code
		{
			get { return _code; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for Code", value, value.ToString());
				_code = value;
			}
		}

		public  virtual string Name
		{
			get { return _name; }
			set
			{
				if ( value != null && value.Length > 60)
					throw new ArgumentOutOfRangeException("Invalid value for Name", value, value.ToString());
				_name = value;
			}
		}

		public  virtual string CityId
		{
			get { return _cityId; }
			set
			{
				if ( value != null && value.Length > 6)
					throw new ArgumentOutOfRangeException("Invalid value for CityId", value, value.ToString());
				_cityId = value;
			}
		}

		

		#endregion
	}
	#endregion
}